function checkNull() {
    var a = !1,
    b = /^\s*$/g,
    c = document.getElementById("step2verifCode").value;
    return "" === c || b.test(c) ? (errorCode(".c_new_prompt", "#step2verifCode", "请输入图形验证码"), fish.one("#step2verifCode").removeClass("c_right"), !1) : (fish.ajax({
        url: "/AjaxHandler/ValidCode.ashx?action=registerverficationcode&codeKey=" + c + "&name=" + fish.one("#mobileNum").val(),
        type: "string",
        sync: !0,
        fn: function(b) {
            "1" === b ? (errorCode(".c_new_prompt", "#step2verifCode", "验证码输入错误，请重新输入"), fish.one("#step2verifCode").removeClass("c_right"), a = !1) : (sucCode(".c_new_prompt", "#step2verifCode", ""), fish.one("#step2verifCode").addClass("c_right"), a = !0)
        }
    }), a)
}
function initShow() {
    fish.one(".c_new_prompt").removeClass("c_invalid_new_prompt"),
    fish.one(".c_new_prompt").html(""),
    fish.one("#step2verifCode").removeClass("c_invalid_focus"),
    fish.one("#step2verifCode").removeClass("c_new_focus")
}
function errorCode(a, b, c) {
    fish.one(b).addClass("c_invalid_focus"),
    fish.one(a).addClass("c_invalid_new_prompt"),
    fish.one(a).html(c)
}
function sucCode(a, b, c) {
    fish.one(a).removeClass("c_invalid_new_prompt"),
    fish.one(a).html(c),
    fish.one(b).removeClass("c_invalid_focus")
}
function findNextSibling(a, b) {
    for (a = a.nextSibling; a;) {
        if (b(a)) return a;
        a = a.nextSibling
    }
    return null
}
function findNextSiblingNode(a) {
    return findNextSibling(a,
    function(a) {
        return a && 1 === a.nodeType ? !0 : !1
    })
}
function findLastSiblingNode(a) {
    return findNextSibling(a,
    function(a) {
        return a && 1 === a.nodeType && (null == a.nextSibling || a.nextSibling && null == a.nextSibling.nextSibling && 3 == a.nextSibling.nodeType) ? !0 : !1
    })
}
function showPrompt(a, b) {
    var c = findLastSiblingNode(a);
    c.className = "prompt",
    c.innerHTML = b
}
function showInvalidMessage(a, b) {
    fish.one(a).hasClass("input") && fish.one(a).addClass("invalid");
    var c = findLastSiblingNode(a);
    c.className = "invalid_message",
    c.innerHTML = b
}
function showValidMessage(a, b) {
    var c = findLastSiblingNode(a);
    c.className = "valid_message",
    c.innerHTML = b
}
function showValidSymbol(a, b) {
    fish.one(a).hasClass("invalid") && fish.one(a).removeClass("invalid");
    var c = findLastSiblingNode(a),
    d = c.getAttribute("data-class-suffix");
    null != d ? c.className = "valid_symbol_" + d: c.className = "valid_symbol",
    c.innerHTML = b
}
function changeVerifCodeImg(a) {
    null == a && (a = document.getElementById("verifCodeImg"))
}
function changeVerifCodeImg2(a) {
    null == a && (a = document.getElementById("step2verifCodeImg")),
    a.src = "/AjaxHandler/ValidCode.ashx?action=registercheckcode&ran=" + Math.random() + "&name=" + fish.one("#mobileNum").val()
}
function checkPasswordStrength(a) {
    var b = ["a123456", "123456a", "qwe123", "qqq111", "qqqqqq1", "cj000000", "123456abc", "abc123", "pppppp1", "qqqqq1", "q123456", "281457jia", "asd123", "qq123456", "abc123456", "qwerty1", "a12345", "123abc", "z123456", "qwer1234", "qqqq1111", "a123456789", "w123456", "tc201314", "aa123456", "pppppp0", "a111111", "abcd1234", "1qaz2wsx", "123456789a", "123456q", "qaz123", "qqqqqq11", "aaa111", "Aa123456", "a123123", "qazwsx123", "q111111", "qwerty123", "qqqqqqq1", "q11111", "zxc123", "123456aa", "zxcvbnm123", "dfaeff34232", "woaini1314", "ppp000", "g123456", "201314", "1q2w3e4r", "a321321", "1234qwer", "a1234567", "A123456", "abc123ddd", "ppppp1", "a12345678", "qqqq11", "q12345", "a11111", "qwe123456", "aaaaaa1", "123456qq", "y123456", "asd123456", "ppppp0", "ABCabc123", "zxcvbnm"],
    c = fish.all(".password_strength p");
    if (c.removeClass("current_level_pointing"), 0 != a.length) {
        a.length < 6 || /^\d+$/.test(a) || /^[A-Za-z]+$/.test(a) || /\s+/.test(a) ? c[0].className = "current_level_pointing": a.length >= 6 && a.length < 10 ? (c[0].className = "current_level_pointing", c[1].className = "current_level_pointing") : (c[0].className = "current_level_pointing", c[1].className = "current_level_pointing", c[2].className = "current_level_pointing");
        for (var d = 0; d < b.length; d++) if (a === b[d]) {
            c.removeClass("current_level_pointing");
            break
        }
    }
}
function mobileVerifCodeValidator(a) {
    var b = a.value;
    return "" === b ? (showInvalidMessage(a, "请输入手机验证码"), !1) : b.length < 6 ? (showInvalidMessage(a, "手机验证码错误，请重新输入"), !1) : !0
}
function initResend() {
    fish.cookie.get("register_mobile_verif_code") || (sendMobileVerifCode(), document.cookie = "register_mobile_verif_code=sent;expires=" + new Date((new Date).getTime() + 6e4).toUTCString());
    var a = fish.dom("#resend");
    countDownSecond(60,
    function(b) {
        showRemainingSecond(a, b)
    })
}
function showRemainingSecond(a, b) {
    a.innerHTML = "重新发送短信(" + b + "秒)",
    0 == b && (a.className = "resend", a.innerHTML = "重新发送短信", showPrompt(a, ""))
}
function countDownSecond(a, b) {
    if ("number" == typeof a) {
        b(a);
        var c = setInterval(function() {
            a--,
            0 >= a && clearInterval(c),
            b(a)
        },
        1e3)
    }
}
function step2Submit(e) {
    var inputElem = fish.dom("#mobileVerifCode");
    initShow(),
    mobileVerifCodeValidator(inputElem) && fish.ajax({
        url: "/AjaxHandler/AlipayPassportInterface.aspx",
        data: "ft=CheckMoblieCode&sourceCode=" + inputElem.value + "&Token=" + document.getElementById("Token").value,
        type: "string",
        fn: function(data) {
            if (data.length > 10) {
                var data = eval("(" + data + ")");
                data.IsSuccess && document.forms.registerStep2.submit(),
                "14200" === data.Status && showInvalidMessage(inputElem, "请点击按钮获取短信验证码"),
                "14201" === data.Status && (1 == parseInt(data.ErrorCount) ? showInvalidMessage(inputElem, "验证码错误，请重输入") : 5 != parseInt(data.ErrorCount) ? showInvalidMessage(inputElem, "验证码错误，还有" + parseInt(5 - parseInt(data.ErrorCount)) + "次机会") : showInvalidMessage(inputElem, "验证码错误，请重新获取验证码")),
                "14202" === data.Status && showInvalidMessage(inputElem, "验证码错误，请重新获取验证码")
            } else switch (data) {
            case "1":
                document.forms.registerStep2.submit();
                break;
            case "2":
                showInvalidMessage(inputElem, "您的操作过于频繁，请稍后再试");
                break;
            case "3":
                showInvalidMessage(inputElem, "60秒内只能获取一次短信，请稍后再试");
                break;
            case "4":
                showInvalidMessage(inputElem, "您已经超过每日获取短信上限，请次日再试");
                break;
            default:
                showInvalidMessage(inputElem, "验证码输入错误，请重新输入")
            }
        }
    })
}
function resendMobileVerifCode(a) {
    if (!fish.one(this).hasClass("resend_disabled") && !fish.one(this).hasClass("resend_invalid") && checkNull()) {
        var b = this,
        c = document.getElementById("step2verifCode").value;
        sendMobileVerifCode(function(a) {
            switch (a) {
            case "0":
                b.className = "resend_disabled",
                showValidMessage(b, "发送成功，请耐心等待"),
                changeVerifCodeImg2(),
                countDownSecond(60,
                function(a) {
                    showRemainingSecond(b, a)
                });
                break;
            case "1":
                showInvalidMessage(b, "发送失败，请重试"),
                changeVerifCodeImg2();
                break;
            case "2":
                b.className = "resend resend_invalid",
                showInvalidMessage(b, "发送次数已达上限"),
                changeVerifCodeImg2();
                break;
            case "3":
                b.className = "resend resend_invalid",
                showInvalidMessage(b, "60秒内只能获取一次短信，请稍后再试"),
                changeVerifCodeImg2();
                break;
            case "4":
                errorCode(".c_new_prompt", "#step2verifCode", "验证码输入错误，请重新输入"),
                changeVerifCodeImg2()
            }
        },
        c)
    }
}
function sendMobileVerifCode(a, b) {
    fish.ajax({
        url: "/AjaxHandler/SendMessage.ashx",
        data: "action=sendAgainMessage&Token=" + document.forms.registerStep2.Token.value + "&checkcode=" + b,
        fn: function(b) {
            "function" == typeof a && a(b)
        }
    })
}
function serialize(a) {
    var b, c, d, e, f, g, h = [],
    i = null;
    for (b = 0, c = a.elements.length; c > b; b++) switch (i = a.elements[b], i.type) {
    case "select-one":
    case "select-multiple":
        if (i.name.length) for (d = 0, e = i.options.length; e > d; d++) f = i.options[d],
        f.selected && (g = "", g = f.hasAttribute ? f.hasAttribute("value") ? f.value: f.text: f.attributes.value.specified ? f.value: f.text, h.push(encodeURIComponent(i.name) + "=" + encodeURIComponent(g)));
        break;
    case void 0:
    case "file":
    case "submit":
    case "reset":
    case "button":
        break;
    case "radio":
    case "checkbox":
        if (!i.checked) break;
    default:
        i.name.length && h.push(encodeURIComponent(i.name) + "=" + encodeURIComponent(i.value))
    }
    return h.join("&")
}
fish.ready(function(e) {
    function getCookieDomain(a) {
        // return location.hostname.match(/^(\d+\.\d+\.\d+\.\d+)|(localhost)$/) ? location.hostname: "all" == a ? location.hostname: /.*(\..*\..*)$/.exec(location.hostname)[1]
    }
    function getValue(a) {
        return document.getElementById(a) ? document.getElementById(a).value: null
    }
    function validatorSubmit() {
        if (_bAnsy && mobileCorrect && pwdOnceCorrect && pwdTwiceCorrect && verifCodeCorrect && lmkhCorrect && lmhyhCorrect && submitClick) {
            var a = "action=CheckAllJudgement&mobile=" + getValue("mobileNum") + "&checkcode=" + getValue("verifCode") + "&ticket=" + getValue("ticket");
            a += document.getElementById("lmk").checked ? -1 == document.forms.registerStep1.refid.value ? "&refid=&randno=&cardno=": "&refid=" + document.forms.registerStep1.refid.value + "&randno=" + getValue("lmhyh") + "&cardno=" + getValue("lmkh") : "&refid=&randno=&cardno=",
            fish.ajax({
                url: "/AjaxHandler/RegisterCheckHandler.ashx?",
                openType: "post",
                type: "string",
                data: a + "&bdstr=" + fish.one("#__bdstr_input__").val(),
                fn: function(a) {
                    "blocked" === a ? (fish.one("#step1Submit").html(""), fish.one("#step1Submit").removeClass("register_submit_btn").addClass("btn_sign_loading"), fish.one("#modulecheck").trigger("click")) : "passed" === a ? (document.forms.registerStep1.submit(), fish.one("#step1Submit").html(""), fish.one("#step1Submit").removeClass("register_submit_btn").addClass("btn_sign_loading")) : "2" == a ? (showInvalidMessage(document.getElementById("verifCode"), "验证码输入错误，请重新输入"), verifCodeCorrect = !1, _bAnsy = !1, TSOCapObj.refresh()) : "3" == a ? (showInvalidMessage(document.getElementById("mobileNum"), '手机号已注册，请更换或用手机号<a rel="nofollow" href=https://passport' + strHost + "/" + location.search + ' class="c_reg_login">登录</a>'), mobileCorrect = !1, _bAnsy = !1, TSOCapObj.refresh()) : "31" == a ? (showInvalidMessage(document.getElementById("mobileNum"), "手机号码格式不正确，请重新输入"), mobileCorrect = !1, _bAnsy = !1, TSOCapObj.refresh()) : "4" == a ? (showInvalidMessage(document.getElementById("mobileNum"), "此手机号已达短信上限，请更换手机号或明天再试"), mobileCorrect = !1, _bAnsy = !1, TSOCapObj.refresh()) : "101" == a && (showInvalidMessage(document.getElementById("refid"), "联名会员号格式不正确，请重新输入"), lmkhCorrect = !1, _bAnsy = !1, TSOCapObj.refresh())
                }
            })
        }
    }
    fish.admin.config({
        mSerialize: {
            v: .1,
            g: 2013072401
        },
        mPop: {
            v: "0.2.4",
            css: 1,
            g: 10130821001
        }
    }),
    fish.one(".has_read a").on("click",
    function() {
        fish.mPop({
            content: fish.one(".clause"),
            afterClose: function() {
                fish.one(".clause").css("display:none")
            }
        })
    }),
    fish.one(".clause_close").on("click",
    function() {
        fish.mPop.close()
    });
    var weakpwdlist = ["a123456", "123qwe", "123456a", "qwe123", "qqq111", "qqqqqq1", "cj000000", "123456abc", "abc123", "pppppp1", "qqqqq1", "q123456", "281457jia", "asd123", "qq123456", "abc123456", "qwerty1", "a12345", "123abc", "z123456", "qwer1234", "qqqq1111", "a123456789", "w123456", "tc201314", "aa123456", "pppppp0", "a111111", "abcd1234", "1qaz2wsx", "123456789a", "123456q", "qaz123", "qqqqqq11", "aaa111", "Aa123456", "a123123", "qazwsx123", "q111111", "qwerty123", "qqqqqqq1", "q11111", "zxc123", "zxcvbnm123", "dfaeff34232", "woaini1314", "ppp000", "g123456", "1q2w3e4r", "a321321", "1234qwer", "a1234567", "A123456", "abc123ddd", "ppppp1", "a12345678", "qqqq11", "q12345", "a11111", "qwe123456", "aaaaaa1", "123456qq", "y123456", "asd123456", "ppppp0", "ABCabc123", "zxcvbnm", "woaini520", "woaini123", "a5201314", "zhang123", "aptx4869", "1A2B3C4D", "123123a", "1q2w3e4r5t", "1qazxsw2", "5201314a", "1q2w3e", "aini1314", "q1w2e3r4", "31415926", "woaini521", "iloveyou", "123qweasd", "a000000", "qq123123", "qq5201314", "000000a", "as123456", "zxc123456", "asdasd", "love1314", "aaa123", "q1w2e3", "a123321", "12qwaszx", "s123456", "nihao123", "wang123", "qq1314520", "a1b2c3", "p@ssword", "123qwe!@#", "1qaz@WSX", "123456.", "123456aa", "zz12369", "qq66666", "w2w2w2", "a12369"],
    strHost;
    strHost = getCookieDomain();
    var mobileCorrect = !1,
    pwdOnceCorrect = !1,
    pwdTwiceCorrect = !1,
    verifCodeCorrect = !1,
    lmkhCorrect = !1,
    lmhyhCorrect = !1,
    clauseAgreeCorrect = !1,
    _bAnsy = !0,
    submitClick = !1,
    validatorToolBox = {
        mobilephoneValidator: function(a) {
            if (_bAnsy) {
                var b = a.value;
                return "" === b || b === a.getAttribute("text-placeholder") ? (showInvalidMessage(a, "请输入手机号码"), mobileCorrect = !1, !1) : fish.valida.phone(b) ? (mobileCorrect = !0, !0) : (showInvalidMessage(a, "手机号码格式不正确，请重新输入"), mobileCorrect = !1, !1)
            }
        },
        passwordValidator: function(a) {
            var b = a.value;
            if ("" === b || b === a.getAttribute("text-placeholder") || b.length < 6 || b.length > 18) return showInvalidMessage(a, "6-18位，字母、数字、特殊符号中的两种或两种以上，不能单独使用字母、数字或符号"),
            fish.one(".invalid_message", fish.one(".c_two_register_info_line ")).removeClass("repwd"),
            pwdOnceCorrect = !1,
            !1;
            if (/\s+/.test(b)) return showInvalidMessage(a, "密码中存在非法字符，请重新输入密码！"),
            fish.one(".invalid_message", fish.one(".c_two_register_info_line ")).addClass("repwd"),
            pwdOnceCorrect = !1,
            !1;
            if (/^\d{6,18}$/.test(b) || /^[A-Za-z]{6,18}$/.test(b) || !/.*\w.*/.test(b)) return showInvalidMessage(a, "6-18位，字母、数字、特殊符号中的两种或两种以上，不能单独使用字母、数字或符号"),
            fish.one(".invalid_message", fish.one(".c_two_register_info_line ")).removeClass("repwd"),
            pwdOnceCorrect = !1,
            !1;
            for (var c = 0; c < weakpwdlist.length; c++) if (b === weakpwdlist[c]) return showInvalidMessage(a, "密码太简单啦"),
            fish.one(".invalid_message", fish.one(".c_two_register_info_line ")).addClass("repwd"),
            pwdOnceCorrect = !1,
            !1;
            return showValidSymbol(a, ""),
            pwdOnceCorrect = !0,
            !0
        },
        rePasswordValidator: function(a) {
            var b = a.value;
            return "" === b || b === a.getAttribute("text-placeholder") ? (showInvalidMessage(a, "请输入确认密码"), pwdTwiceCorrect = !1, !1) : b !== document.forms.registerStep1.pwdOnce.value ? (showInvalidMessage(a, "两次输入的密码不一致，请重新输入"), pwdTwiceCorrect = !1, !1) : (pwdTwiceCorrect = !0, showValidSymbol(a, ""), !0)
        },
        verifCodeValidator: function(a) {
            var b = a.value;
            return "" === b || b === a.getAttribute("text-placeholder") ? (showInvalidMessage(a, "请输入验证码"), verifCodeCorrect = !1, !1) : !0
        },
        coBrandCardNoValidator: function(a) {
            var b = document.forms.registerStep1.refid;
            if (!document.getElementById("lmk").checked || -1 == document.forms.registerStep1.refid.value || fish.one(a.parentNode).hasClass("none")) return lmkhCorrect = !0,
            !0;
            var c = a.value;
            if ("" === c || c === a.getAttribute("text-placeholder")) return showInvalidMessage(a, "请输入银行卡号"),
            lmkhCorrect = !1,
            !1;
            var d = b.options[b.selectedIndex].getAttribute("data-card-type-regex"),
            e = d ? new RegExp(d, "g") : /^\d*$/;
            return e.test(c) ? !0 : (showInvalidMessage(a, "银行卡号格式不正确，请重新输入"), lmkhCorrect = !1, !1)
        },
        memberNoValidator: function(a) {
            var b = document.forms.registerStep1.refid;
            if (!document.getElementById("lmk").checked || -1 == b.value || fish.one(a.parentNode).hasClass("none")) return lmhyhCorrect = !0,
            !0;
            var c = a.value;
            if ("" === c || c === a.getAttribute("text-placeholder")) return showInvalidMessage(a, "请输入11位联名会员号"),
            lmhyhCorrect = !1,
            !1;
            var d = b.options[b.selectedIndex].getAttribute("data-card-type-regex"),
            e = d ? new RegExp(d, "g") : /^\d*$/;
            return 11 === c.length && e.test(c) ? !0 : (showInvalidMessage(a, "联名会员号格式不正确，请重新输入"), lmhyhCorrect = !1, !1)
        },
        agreeClauseValidator: function(a) {
            var b = a.checked;
            return 0 == b ? (showInvalidMessage(a, "请勾选"), clauseAgreeCorrect = !1, !1) : !0
        }
    };
    fish.one("#mobileNum").on("keyup",
    function() {
        if (11 == fish.one("#mobileNum").val().length);
        else {
            submitClick = !1,
            _bAnsy = !0,
            fish.one(this).removeClass("invalid").addClass("focus");
            var a = this.getAttribute("data-prompt");
            null == a && (a = "");
            var b = findLastSiblingNode(this);
            b.className = "prompt",
            b.innerHTML = a
        }
    }),
    fish.one("#pwdOnce").on("keyup",
    function() {
        if (fish.one("#pwdOnce").val().length >= 6) validatorToolBox.passwordValidator(fish.dom("#pwdOnce"));
        else {
            submitClick = !1,
            _bAnsy = !0,
            fish.one(this).removeClass("invalid").addClass("focus");
            var a = this.getAttribute("data-prompt");
            null == a && (a = "");
            var b = findLastSiblingNode(this);
            b.className = "prompt",
            b.innerHTML = a
        }
    }),
    fish.one("#pwdTwice").on("keyup",
    function() {
        if (fish.one("#pwdTwice").val().length >= 6) validatorToolBox.rePasswordValidator(fish.dom("#pwdTwice"));
        else {
            submitClick = !1,
            _bAnsy = !0,
            fish.one(this).removeClass("invalid").addClass("focus");
            var a = this.getAttribute("data-prompt");
            null == a && (a = "");
            var b = findLastSiblingNode(this);
            b.className = "prompt",
            b.innerHTML = a
        }
    }),
    fish.one("#verifCode").on("keyup",
    function() {});
    var remoteValidatorToolbox = {
        remoteVertificationResults: {},
        submitDecide: function(a, b, c, d) {
            if ("undefined" != typeof b && (remoteValidatorToolbox.remoteVertificationResults[a] = !0, remoteValidatorToolbox.remoteVertificationResults[a], d === !0)) {
                var e = !0;
                for (var a in c) if (c.hasOwnProperty(a) && remoteValidatorToolbox.remoteVertificationResults[a] !== !0) {
                    e = !1;
                    break
                }
                e === !0 && b.submit()
            }
        },
        isVerifCodeCorrect: function(a, b, c, d) {
            if (validatorToolBox.verifCodeValidator(a) !== !1) {
                var e = function() {
                    var c = document.getElementById("verifCode").value;
                    TSOCapObj.verify(c,
                    function(c) {
                        if (0 == c.errorCode) {
                            var d = document.getElementById("ticket");
                            d.value = c.ticket,
                            verifCodeCorrect = !0,
                            showValidSymbol(a, ""),
                            validatorSubmit()
                        } else verifCodeCorrect = !1,
                        showInvalidMessage(a, "验证码输入错误，请重新输入"),
                        "undefined" != typeof b && changeVerifCodeImg()
                    })
                };
                e()
            }
        },
        isCoBrandCardNoCorrect: function(a, b, c, d) {
            var e = document.forms.registerStep1.refid,
            f = e.options[e.selectedIndex],
            g = f.getAttribute("data-card-type"),
            h = null;
            return h = "3" === g || "2" === g ? e.value: 0,
            !document.getElementById("lmk").checked || -1 == e.value || fish.one(a.parentNode).hasClass("none") ? (lmkhCorrect = !0, void remoteValidatorToolbox.submitDecide(a.name, b, c, d)) : void(validatorToolBox.coBrandCardNoValidator(a) !== !1 && fish.ajax({
                url: "/AjaxHandler/RegisterCheckHandler.ashx",
                type: "string",
                data: "action=checkcardno&cardType=1&refid=" + h + "&cardno=" + a.value,
                fn: function(b) {
                    switch (b) {
                    case "1":
                        lmkhCorrect = !1,
                        showInvalidMessage(a, "该银行卡号错误或已注册，更换其他卡号");
                        break;
                    default:
                        lmkhCorrect = !0,
                        showValidSymbol(a, ""),
                        validatorSubmit()
                    }
                }
            }))
        },
        isMemberNoCorrect: function(a, b, c, d) {
            var e = document.forms.registerStep1.refid;
            return ! document.getElementById("lmk").checked || -1 == e.value || fish.one(a.parentNode).hasClass("none") ? (remoteValidatorToolbox.submitDecide(a.name, b, c, d), void(lmhyhCorrect = !0)) : void(validatorToolBox.memberNoValidator(a) !== !1 && fish.ajax({
                url: "/AjaxHandler/RegisterCheckHandler.ashx",
                type: "string",
                data: "action=checkcardno&refid=" + e.value + "&randno=" + a.value,
                fn: function(b) {
                    switch (b) {
                    case "0":
                        lmhyhCorrect = !1,
                        showInvalidMessage(a, "联名会员号不正确，请重新输入");
                        break;
                    default:
                        lmhyhCorrect = !0,
                        showValidSymbol(a, ""),
                        validatorSubmit()
                    }
                }
            }))
        }
    };
    if (fish.one("#mobileNum").on("blur",
    function() {}), document.forms.registerStep1) {
        document.forms.registerStep1.reset(),
        fish.ajax({
            url: "//passport.ly.com/AjaxHandler/RegisterCheckHandler.ashx?action=returnlmkbind",
            fn: function(data) {
                for (var coBrandCards = eval("(" + data + ")"), coBrandCardType = document.forms.registerStep1.refid, option, i = 0, len = coBrandCards.length; len > i; i++) option = new Option(coBrandCards[i].CardName, coBrandCards[i].RefId),
                option.title = coBrandCards[i].CardName,
                option.setAttribute("data-card-type", coBrandCards[i].CardType),
                "" != coBrandCards[i].CardRegex && option.setAttribute("data-card-type-regex", coBrandCards[i].CardRegex),
                coBrandCardType.options.add(option)
            }
        }),
        fish.mCitySelect({
            province: document.forms.registerStep1.address_province,
            city: document.forms.registerStep1.address_city,
            valueName: "id"
        });
        var validatorConfig = {
            mobileNum: "mobilephoneValidator",
            pwdOnce: "passwordValidator",
            pwdTwice: "rePasswordValidator",
            verifCode: "verifCodeValidator",
            lmkh: "coBrandCardNoValidator",
            lmhyh: "memberNoValidator",
            lma: "agreeClauseValidator"
        },
        remoteValidatorConfig = {
            verifCode: "isVerifCodeCorrect",
            lmkh: "isCoBrandCardNoCorrect",
            lmhyh: "isMemberNoCorrect"
        };
        fish.all(".input").on("focus",
        function(a) {
            submitClick = !1,
            _bAnsy = !0,
            fish.one(this).removeClass("invalid").addClass("focus");
            var b = this.getAttribute("data-prompt");
            null == b && (b = "");
            var c = findLastSiblingNode(this);
            c.className = "prompt",
            c.innerHTML = b
        }).on("blur",
        function(a) {
            var b = this;
            submitClick = !1,
            fish.one(b).removeClass("focus"),
            validatorConfig[b.name] && validatorToolBox[validatorConfig[b.name]] && validatorToolBox[validatorConfig[b.name]](b) && remoteValidatorConfig[b.name] && remoteValidatorToolbox[remoteValidatorConfig[b.name]] && remoteValidatorToolbox[remoteValidatorConfig[b.name]](b)
        }),
        fish.one("#pwdOnce").on("keyup",
        function(a) {
            checkPasswordStrength(this.value)
        }),
        fish.one("#verifCodeImg").on("click",
        function(a) {
            changeVerifCodeImg(this)
        }),
        fish.one("#changeVerifCodeImg").hover(function(a) {
            this.className = "change_verif_code_img_hover"
        },
        function(a) {
            this.className = "change_verif_code_img"
        }),
        fish.one("#changeVerifCodeImg").on("click",
        function(a) {
            changeVerifCodeImg()
        }),
        fish.one(".has_co_brand_card_line em").on("click",
        function() {
            var a = fish.one(".has_co_brand_card_line em"),
            b = fish.dom("#lmk");
            a.toggleClass("gou"),
            a.hasClass("gou") ? (b.checked = !0, fish.one(".co_brand_card_wrapper").removeClass("none")) : (b.checked = !1, fish.one(".co_brand_card_wrapper").addClass("none"))
        });
        var agree_gou = fish.one(".has_read_and_agree_line em"),
        agree_selected = fish.dom("#lma");
        agree_gou.addClass("gou"),
        agree_selected.checked = !0,
        agree_gou.on("click",
        function() {
            if (agree_gou.toggleClass("gou"), agree_gou.hasClass("gou")) {
                agree_selected.checked = !0,
                submitClick = !1,
                _bAnsy = !0;
                var a = findLastSiblingNode(this);
                a.className = "prompt",
                a.innerHTML = ""
            } else agree_selected.checked = !1
        }),
        fish.one("#refid").on("change",
        function(a) {
            if ("-1" === this.value) fish.one(".co_brand_card_panel").addClass("none");
            else {
                var b = this.options[this.selectedIndex],
                c = b.getAttribute("data-card-type");
                switch (c) {
                case "1":
                    fish.one(".co_brand_card_no_line").addClass("none"),
                    fish.one(".membership_no_line").removeClass("none");
                    break;
                case "2":
                    fish.one(".co_brand_card_no_line").removeClass("none"),
                    fish.one(".membership_no_line").removeClass("none");
                    break;
                case "3":
                    fish.one(".co_brand_card_no_line").removeClass("none"),
                    fish.one(".membership_no_line").addClass("none")
                }
                fish.one(".co_brand_card_panel").removeClass("none")
            }
        }),
        fish.one("#step1Submit").on("click",
        function(a) {
            var b = !1;
            for (var c in validatorConfig) validatorToolBox[validatorConfig[c]](document.forms.registerStep1[c]) || (b = !0);
            submitClick = !0,
            validatorSubmit()
        })
    } else if (document.forms.registerStep2) {
        var resendElem = fish.dom("#resend"),
        resendBoxt = fish.one(".resend_wrapper");
        fish.one(".no_get").on("click",
        function(a) {
            resendBoxt.toggleClass("none")
        }),
        countDownSecond(60,
        function(a) {
            showRemainingSecond(resendElem, a)
        }),
        fish.one("#cStep2changeVerifCodeImg").on("click",
        function(a) {
            changeVerifCodeImg2()
        }),
        fish.one("#step2verifCodeImg").on("click",
        function(a) {
            changeVerifCodeImg2(this)
        }),
        fish.one("#mobileVerifCode").on("focus",
        function(a) {
            initShow(),
            fish.one(this).removeClass("invalid").addClass("focus"),
            showPrompt(this, ""),
            fish.one("#cMyPrompt").removeClass("valid_message").removeClass("invalid_message").addClass("prompt").html("")
        }).on("blur",
        function(a) {
            fish.one(this).removeClass("focus")
        }),
        fish.one("#step2verifCode").on("focus",
        function(a) {
            fish.one(this).removeClass("c_invalid_focus"),
            fish.one(this).addClass("c_new_focus"),
            fish.one(".c_new_prompt").removeClass("c_invalid_new_prompt"),
            fish.one(".c_new_prompt").html("")
        }).on("blur",
        function(a) {
            initShow(),
            checkNull()
        }),
        fish.one("#step2Submit").on("click", step2Submit),
        fish.one("#resend").on("click", resendMobileVerifCode)
    }
}),
fish.ready(function() {
    var a = fish.dom("#getcode"),
    b = .8 * Math.random(10),
    c = document.createElement("script");
    c.src = "https://api.geetest.com/get.php?gt=2a5a18f8c5635a02c7ecd46e7d527353&product=popup&popupbtnid=modulecheck&logo=false&width=" + parseInt(b),
    c.async = !0,
    a.appendChild(c)
}),
window.gt_custom_ajax = function(a, b, c) {
    if (a) {
        var d = fish.one("#getcode"),
        e = [];
        e = fish.all("input", d),
        fish.ajax({
            openType: "post",
            data: "action=checkblock&geetest_challenge=" + e[0].value + "&geetest_validate=" + e[1].value + "&geetest_seccode=" + e[2].value + "&mobile=" + fish.one("#mobileNum").val(),
            url: "https://passport.ly.com/ajaxhandler/registercheckhandler.ashx",
            fn: function(a) {
                a && "1" === a && document.forms.registerStep1.submit()
            }
        })
    }
},
window.onload = function() {
    TSOCapObj.init("verifCodeImg"),
    TSOCapObj.refresh()
};